from gi.repository import Gtk, GdkPixbuf, Gdk
import os, sys

sys.path.append("/home/gbf/nautilus-id3extract/src/")

UI_FILE = "interface.glade"

class GUI:
	info = {}
	
	def __init__(self):

		self.builder = Gtk.Builder()
		self.builder.add_from_file("/home/gbf/nautilus-id3extract/src/" + UI_FILE)
		self.builder.connect_signals(self)

		window = self.builder.get_object('window1')

		window.show_all()

	def destroy(window, self):
	    Gtk.main_quit()

	def aplicar(self, button ):
		artista = self.builder.get_object('artista_entry').get_text()
		album = self.builder.get_object('album_entry').get_text()
		genero = self.builder.get_object('genero_entry').get_text()
		self.info = dict(artista=artista, album=album, genero=genero)		
		
def main():
	app = GUI()
	Gtk.main()
		
if __name__ == "__main__":
    sys.exit(main())

